package com.hclc.yxb.model;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.hclc.entity.model.enums.MobileTypeEnum;
import com.hclc.entity.model.enums.UpdateTypeEnum;
import com.hclc.entity.model.series.CustomLocalDateTimeSerializer;
import com.hclc.entity.model.series.DeCustomLocalDateTimeSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>移动端版本表</p>
 * @author hef
 * @since 2020-08-20
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper=false)
@Accessors(chain = true)
@TableName("`t_system_mobile_terminal_version`")
public class SystemMobileTerminalVersionModel implements Serializable {

	private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value="`id`", type= IdType.ASSIGN_ID)
	@ApiModelProperty(value = "主键")
    private String id;

    /**
     * 类型{USER,1,用户端}
     */
    @TableField(value = "`type`")
	@ApiModelProperty(value = "类型{USER,1,用户端}")
    private MobileTypeEnum type;

    /**
     * 版本
     */
    @TableField(value = "`version`")
    @Version
	@ApiModelProperty(value = "版本")
    private String version;

    /**
     * 更新url
     */
    @TableField(value = "`url`")
	@ApiModelProperty(value = "更新url")
    private String url;

    /**
     * 备注
     */
    @TableField(value = "`remark`")
	@ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 状态
     */
    @TableField(value = "`status`")
	@ApiModelProperty(value = "状态")
    private Integer status;

    /**
     * 是否有效(1:有效,0：无效)
     */
    @TableField(value = "`enable`")
	@ApiModelProperty(value = "是否有效(1:有效,0：无效)")
    private Integer enable;

    /**
     * 创建时间
     */
    @TableField(value = "`create_time`", fill = FieldFill.INSERT)
	@ApiModelProperty(value = "创建时间")
    @JsonDeserialize(using = DeCustomLocalDateTimeSerializer.class)
    @JsonSerialize(using = CustomLocalDateTimeSerializer.class)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "`update_time`", fill = FieldFill.INSERT_UPDATE)
	@ApiModelProperty(value = "更新时间")
    @JsonDeserialize(using = DeCustomLocalDateTimeSerializer.class)
    @JsonSerialize(using = CustomLocalDateTimeSerializer.class)
    private LocalDateTime updateTime;

    @TableField("`update_type`")
    @ApiModelProperty(value = "是否需要更新{YES,1,是;NO,2,否}")
    private UpdateTypeEnum updateType;


    /**
     * 版本更新内容
     */
    @TableField(value = "`version_content`")
	@ApiModelProperty(value = "版本更新内容")
    private String versionContent;

    /**
     * 版本附加数据
     */
    @TableField(value = "`version_data`")
	@ApiModelProperty(value = "版本附加数据")
    private String versionData;


}
